package com.yh.tomcat.embed;

import org.apache.catalina.startup.Tomcat;

public class App {

	static Tomcat tomcat8 = null;

	public static void main(String[] args) throws Exception {
		tomcat8 = new Tomcat ();
		tomcat8.setBaseDir ("D:/myeclipse2014/tomcat-embed/res/temp/"); // 不是必须的,但建议设置(参见DOC)
		tomcat8.addWebapp ("/examples", "D:/myeclipse2014/tomcat-embed/res/webapps/examples/"); // webapp
		tomcat8.addWebapp ("/manager", "D:/myeclipse2014/tomcat-embed/res/webapps/manager/"); // webapp
		tomcat8.getConnector ().setURIEncoding ("UTF-8");
		tomcat8.start ();
		tomcat8.getServer ().await ();
	}
}
